package service.Impl;

import dao.RegistrationRecordsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.RegistrationRecords;
import service.RegistrationRecordsService;

import java.util.List;
import java.util.Map;

@Service
public class RegistrationRecordsServiceImpl implements RegistrationRecordsService {

    @Autowired
    private RegistrationRecordsDao registrationRecordsDao;

    @Override
    public List<RegistrationRecords> selectAllRecords() {
        return registrationRecordsDao.selectAllRecords();
    }

    @Override
    public List<RegistrationRecords> selectByDoctorId(String docId) {
        return registrationRecordsDao.selectByDoctorId(docId);
    }

    @Override
    public List<RegistrationRecords> selectByDate(String day) {
        return registrationRecordsDao.selectByDate(day);
    }

    @Override
    public List<Map<String, Object>> countByDepartment() {
        return registrationRecordsDao.countByDepartment();
    }

    @Override
    public List<RegistrationRecords> selectDoctorSchedules() {
        return registrationRecordsDao.selectDoctorSchedules();
    }

    @Override
    public int insert(RegistrationRecords record) {
        return registrationRecordsDao.insert(record);
    }

    @Override
    public int updateByPrimaryKey(RegistrationRecords record) {
        return registrationRecordsDao.updateByPrimaryKey(record);
    }

    @Override
    public List<RegistrationRecords> selectByPatientId(String patientId) {
        return registrationRecordsDao.selectByPatientId(patientId);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return registrationRecordsDao.deleteByPrimaryKey(id);
    }

    @Override
    public RegistrationRecords selectByPrimaryKey(Integer id) {
        return registrationRecordsDao.selectByPrimaryKey(id);
    }
    @Override
    public List<RegistrationRecords> selectByDoctorIdAndDays(String docId, List<String> days) {
        return registrationRecordsDao.selectByDoctorIdAndDays(docId, days);
    }
}